<%@ page contentType="text/html;charset=UTF-8" %>
<%@include file="../../common/sessionValidate.jsp" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<html lang="UTF-8">
<head>
    <title>T_contract_bill信息维护</title>
    <%@ include file="../../common/meta.jsp" %>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="X-UA-Compatible" content="IE=9">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <link rel="stylesheet" href="<%=basePath%>css/my-bootstrap.css" media="screen" id="tuserskin">
    <link rel="stylesheet" href="<%=basePath%>js/toastr/toastr.css">
    <link rel="stylesheet" href="<%=basePath%>css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="<%=basePath%>css/font-awesome.min.css">
    <script type="text/javascript" src="<%= basePath %>js/jquery.cookie.js"></script>
</head>
<style>
    hr {
        margin-top: 1px;
        border-bottom: 1px solid #1BBC9B;
    }
</style>
<body>
<form class="form-horizontal form-bordered form-row-strippe" name="ffAdd" id="ffAdd" mentod="post" role="form"
      data-toggle="validator" enctype="multipart/form-data">
    <div class="" style="margin-right:2px;padding-right:1px;">

        <!-------------------------- 面板  start--------------------------------->
        <div class="panel panel-primary">
            <div class="panel-heading clearfix" id="addHeaderDiv">
            </div>
            <div class="panel-body">
                <div class="row">
                    <h5>&nbsp;&nbsp;基本信息</h5>
                    <hr>
                    <div class="col-xs-6"><!--start 换列-->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font> 业主/租客</label>
                                <div class="col-xs-9">
                                    <select id="ext1" name="ext1" onchange="getCompanyList()"
                                            class="form-control">
                                        <option value="">---请选择---</option>
                                    </select>
                                    <input id="billid" name="billid" type="hidden"/>
                                    <input id="sftype" name="sftype" type="hidden" value="付款"/>
                                    <input id="biztype" name="biztype" type="hidden" value="selfbill"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>楼栋</label>
                                <div class="col-xs-9">
                                    <select id="ext2" name="ext2" onchange="getBuildingHouseList()"
                                            class="form-control">
                                        <option value="">---请选择---</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>房号</label>
                                <div class="col-xs-9">
                                    <select id="ext3" name="ext3" class="form-control">
                                        <option value="">---请选择---</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>账单总金额（元）</label>
                                <div class="col-xs-9">
                                    <input id="totalprice" name="totalprice" type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>应付日期</label>
                                <div class="col-xs-9">
                                    <input id="payday" name="payday" type="text" class="form-control"
                                           onclick='SelectDate(this)' readonly='true' placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>最后付款日期</label>
                                <div class="col-xs-9">
                                    <input id="endday" name="endday" type="text" class="form-control"
                                           onclick='SelectDate(this)' readonly='true' placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 备注1 </label>
                                <div class="col-xs-9">
                                    <input id="ext5" name="ext5" type="text" class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <!--如果输入元素是偶数个元素，在n=size/2?int时输出2列格式；如果元素是奇数个，需要在n=size/2?int时输出2列格式；需要换列，每行最多显示2列-->
                    </div><!--end 换列--><!--start 换列-->
                    <div class="col-xs-6">
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>账单类型</label>
                                <div class="col-xs-9">
                                    <select id="billtype" name="billtype" class="form-control">
                                        <option value="">--请选择--</option>
                                        <option value="水费">水费</option>
                                        <option value="电费">电费</option>
                                        <option value="租金">租金</option>
                                        <option value="物业费">物业费</option>
                                        <option value="公共能损耗">公共能损耗</option>
                                        <option value="其它能损耗">其它能损耗</option>
                                        <option value="装修押金">装修押金</option>
                                        <option value="停车费">停车费</option>
                                        <option value="车位费">车位费</option>
                                        <option value="垃圾清运费">垃圾清运费</option>
                                        <option value="楼道保洁费">楼道保洁费</option>
                                        <option value="其它">其它</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>开始时间</label>
                                <div class="col-xs-9">
                                    <input id="billstartdate" name="billstartdate" type="text" class="form-control"
                                           onclick='SelectDate(this)' readonly='true'/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>结束时间</label>
                                <div class="col-xs-9">
                                    <input id="billenddate" name="billenddate" type="text" class="form-control"
                                           onclick='SelectDate(this)' readonly='true' placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 合同号</label>
                                <div class="col-xs-9">
                                    <input id="contractno" name="contractno" type="text" class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> <font color="red">*</font>状态 </label>
                                <div class="col-xs-9">
                                    <select id="status" name="status" class="form-control">
                                        <option value="已生效">已生效</option>
                                        <option value="待生效" selected>待生效</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">  备注2 </label>
                                <div class="col-xs-9">
                                    <input id="ext6" name="ext6" type="text" class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>

                    </div><!--end 换列-->
                </div><!--end row-->
            </div><!--end body-->

            <div class="modal-footer bg-info " id='buttonDiv'>
            </div>
        </div>
        <!--------------------------面板 end------------------------------------>

        <!-- 模态框（Modal）start -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="myModalLabel">提示</h4>
                    </div>
                    <div class="modal-body" id="myModalMessDiv"></div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>
        <!-- 模态框（Modal）end -->

    </div>
</form>
</body>
</html>

<script src="<%=basePath%>js/bootstrap.min.js"></script>
<!--<script src="<%=basePath%>js/jquery-1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrapValidator.js"></script>-->
<script src="<%=basePath%>js/bootstrap-paginator.min.js"></script>
<script src="<%=basePath%>/js/respond.js"></script>
<script src="<%=basePath%>/js/html5.js"></script>
<script src="<%=basePath%>js/toastr/toastr.js"></script>
<script src="<%=basePath%>js/bootbox.js"></script>
<script src="<%=basePath%>js/jquery.validate.js"></script>
<!-- <script src="<%=basePath%>js/additional-methods.min.js"></script> -->
<script src="<%=basePath%>js/my-jquery-curd.js"></script>
<script src="<%= basePath %>js/tableSortTool.js"></script>
<script src="<%= basePath %>js/calendar.js"></script>
<script type="text/javascript">
    //新增保存数据
    function add() {
        $("#addSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_contract_bill/saveT_contract_bill?time=" + Math.random();
        var postData = $("#ffAdd").serializeArray();
        //alert(postData);
        $.post(url, postData, function (data) {
            //var data = $.parseJSON(data);
            if (data.result == "success") {
                //保存成功  1.关闭弹出层，
                showSuccessTips("恭喜保存成功!", "提示");
                //history.goBack();
            } else {
                $("#addSaveButton").removeAttr("disabled");
                //showErrorTips("保存数据失败!", "错误信息：");
                $("#myModal").modal('show'); //hide;
                $("#myModalMessDiv").html("<font color='red'>对不起,保存数据失败，失败原因：" + data.info + "</font>");
                return false;
            }
        }).error(function () {
            $("#addSaveButton").removeAttr("disabled");
            //showErrorTips("保存数据失败!", "错误信息：");
            $("#myModal").modal('show'); //hide;
            $("#myModalMessDiv").html("<font color='red'>对不起,保存数据失败，失败原因：" + data.info + "</font>");
        });
    }

    //更新修改数据到后台
    function edit() {
        $("#editSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_contract_bill/updateT_contract_bill?time=" + Math.random();
        myEdit2(url);
    }

    //更新修改数据到后台并且启动工作流
    function tjsh() {
        $("#editSaveButton").attr("disabled", true);
        $("#tjshSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_contract_bill/tjshT_contract_bill?time=" + Math.random();
        myCurdTjsh(url);
    }

    function toBillList() {
        var url = " <%=basePath%>t_contract_bill/toT_contract_billList?1=1&time=" + Math.random();
        window.location.href = url;
    }

    //获取楼栋列表信息
    function getCompanyList() {
        var url = "<%=basePath%>t_company/getAllT_company?startIndex=0&pageSize=10000&time=" + Math.random();
        //$.ajaxSettings.async = false;    //在执行之前加(同步执行)
        $.getJSON(url, function (data) {
            var str = "";
            $.each(data.items, function (i, item) {
                str += "<option value='" + item.company_name + "'>" + item.company_name + "</option>";
            });//end each data;
            $("#ext1").append(str);
            //alert("str="+str);
        });//end getJSON;
    }

    //获取楼栋房源列表信息
    function getBuildingHouseList() {
        $("select[name='ext3']")[0].options.length = 0; //清空上一次初始化的值；
        var buildingname = $("select[name='ext2']").val();
        //alert("buildingname="+buildingname);
        var url = "<%=basePath%>t_building_house/getAllT_building_house?buildingtype=1&buildingname=" + buildingname + "&startIndex=0&pageSize=10000&time=" + Math.random();
        //$.ajaxSettings.async = false;    //在执行之前加(同步执行)
        $.getJSON(url, function (data) {
            var str = "";
            $.each(data.items, function (i, item) {
                str += "<option value='" + item.housename + "'>" + item.housename + "</option>";
            });//end each data;
            $("#ext3").append(str);
            //alert("str="+str);
        });//end getJSON;
    }

    //获取楼栋列表信息
    function getBuildingList() {
        var url = "<%=basePath%>t_building/getAllT_building?buildingtype=1&startIndex=0&pageSize=10000&time=" + Math.random();
        $.ajaxSettings.async = false;    //在执行之前加(同步执行)
        $.getJSON(url, function (data) {
            var str = "";
            $.each(data.items, function (i, item) {
                str += "<option value='" + item.name + "'>" + item.name + "</option>";
            });//end each data;
            $("#ext2").append(str);
            //alert("str="+str);
        });//end getJSON;
    }

    //初始化页面及校验
    $().ready(function () {
        getCompanyList();
        getBuildingList();
        //getBuildingHouseList();

        //1、初始化数据显示
        var name = "自定义付款账单";
        var optype = '<%=request.getParameter("oplx")%>';
        var id = '<%=request.getParameter("id")%>';
        //alert("optype="+optype+";id="+id);
        if (optype == 'add') {
            $("#ffAdd")[0].reset();/*重置表单*/
            var basePath = "<i class='icon-plus'></i>&nbsp;";
            setHeader2("新增" + name, basePath);//设置addHeaderDiv标题文字及按钮
            setButtonDivAdd2();//设置adddiv的 操作按钮
        } else if (optype == 'edit') {
            var basePath = "<i class='icon-pencil'></i>&nbsp;";
            setHeader2("修改" + name, basePath);//设置addHeaderDiv标题文字及按钮
            setButtonDivEdit2();//设置adddiv的 操作按钮
            //setButtonDivEdit4();//设置adddiv的 操作按钮
            var url = "<%=basePath%>t_contract_bill/getT_contract_bill?id=" + id + "&time=" + Math.random();
            $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
                setValue(data);
                $("#ext1").append("<option value='" + data.ext1 + "' selected>" + data.ext1 + "</option>");
                $("#ext2").append("<option value='" + data.ext2 + "' selected>" + data.ext2 + "</option>");
                $("#ext3").append("<option value='" + data.ext3 + "' selected>" + data.ext3 + "</option>");
                //alert($("#effect_date").val()+""+jsonDateFormat($("#effect_date").val()));
                //$("#effect_date").val(jsonDateFormat($("#effect_date").val())); //重新设置日期类型的值
            });
        } else if (optype == 'view') {
            var basePath = "<i class='icon-eye-open'></i>&nbsp;";//设置addHeaderDiv标题文字及按钮
            setHeader2("查看" + name, basePath);
            setButtonDivView2();//设置adddiv的 操作按钮
            var url = "<%=basePath%>t_contract_bill/getT_contract_bill?id=" + id + "&time=" + Math.random();
            $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
                setValue(data);
                $("#ext1").append("<option value='" + data.ext1 + "' selected>" + data.ext1 + "</option>");
                $("#ext2").append("<option value='" + data.ext2 + "' selected>" + data.ext2 + "</option>");
                $("#ext3").append("<option value='" + data.ext3 + "' selected>" + data.ext3 + "</option>");
                //alert($("#effect_date").val()+""+jsonDateFormat($("#effect_date").val()));
                //$("#effect_date").val(jsonDateFormat($("#effect_date").val())); //重新设置日期类型的值
            });
            formReadOnly('ffAdd');//设置表单不可修改
        }

        //2、校验脚本初始化，start check
        $("#ffAdd").validate({
            submitHandler: function (form) {
                //alert($("#opType").val());
                if ($("#opType").val() == "add") {
                    add();
                } else if ($("#opType").val() == "edit") {
                    edit();
                }
            },
            rules: {
                billid: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                billno: {
                    //required: true,
                    maxlength: 45
                },
                contractid: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                contractno: {
                    //required: true,
                    maxlength: 45
                },
                buildingid: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                buildingno: {
                    //required: true,
                    maxlength: 45
                },
                companyid: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                conpanyno: {
                    //required: true,
                    maxlength: 45
                },
                payday: {
                    required: true,
                    maxlength: 45
                },
                totalprice: {
                    required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 14
                },
                info: {
                    //required: true,
                    maxlength: 45
                },
                billtime: {
                    //required: true,
                    maxlength: 45
                },
                status: {
                    //required: true,
                    maxlength: 45
                },
                recivetotal: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                minprice: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                endday: {
                    required: true,
                    maxlength: 45
                },
                billstartdate: {
                    required: true,
                    maxlength: 45
                },
                billenddate: {
                    required: true,
                    maxlength: 45
                },
                area: {
                    //required: true,
                    maxlength: 45
                },
                linktel: {
                    //required: true,
                    maxlength: 45
                },
                billtype: {
                    required: true,
                    maxlength: 45
                },
                creater: {
                    //required: true,
                    maxlength: 45
                },
                creattime: {
                    //required: true,
                    maxlength: 45
                },
                updater: {
                    //required: true,
                    maxlength: 45
                },
                updatetime: {
                    //required: true,
                    maxlength: 45
                },
                ext1: {
                    required: true,
                    maxlength: 45
                },
                ext2: {
                    required: true,
                    maxlength: 45
                },
                ext3: {
                    required: true,
                    maxlength: 45
                },
                ext4: {
                    required: true,
                    number: true,
                    maxlength: 3
                },
                ext5: {
                    //required: true,
                    maxlength: 45
                },
                ext6: {
                    //required: true,
                    maxlength: 45
                },
                invoicestatus: {
                    //required: true,
                    maxlength: 45
                },
                invoiceno: {
                    //required: true,
                    maxlength: 512
                },
                invoicedoner: {
                    //required: true,
                    maxlength: 45
                },
                invoicetime: {
                    //required: true,
                    maxlength: 45
                },
                receiveinvoice: {
                    //required: true,
                    maxlength: 45
                },
                latefee: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                overduemoney: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                shouldrecivetotal: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                sftype: {
                    //required: true,
                    maxlength: 45
                },
                basefee: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                paypreday: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                paypredaytype: {
                    //required: true,
                    maxlength: 45
                },
                overduestatus: {
                    //required: true,
                    maxlength: 45
                },
                invoicetype: {
                    //required: true,
                    maxlength: 45
                },
                rate: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                ratemoney: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                invoicedmoney: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                }
            }, //end rules;
            messages: {
                billid: {
                    //required: " billid不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> billid最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                billno: {
                    maxlength: "<font color='red'> billno最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                contractid: {
                    //required: " contractid不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> contractid最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                contractno: {
                    maxlength: "<font color='red'>  最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                buildingid: {
                    //required: " buildingid不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> buildingid最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                buildingno: {
                    maxlength: "<font color='red'> buildingno最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                companyid: {
                    //required: " companyid不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> companyid最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                conpanyno: {
                    maxlength: "<font color='red'> conpanyno最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                payday: {
                    required: "<font color='red'>不能为空！</font>",
                    maxlength: "<font color='red'> 应付日期最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                totalprice: {
                    required: "<font color='red'>不能为空！</font>",
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>账单金额最大支持14位,输入的数据已经超过最大长度！</font>"
                },
                info: {
                    maxlength: "<font color='red'>说明最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                billtime: {
                    maxlength: "<font color='red'>账单日期最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                status: {
                    maxlength: "<font color='red'> status最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                recivetotal: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> recivetotal最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                minprice: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> minprice最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                endday: {
                    required: "<font color='red'> 不能为空！</font>",
                    maxlength: "<font color='red'> 最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                billstartdate: {
                    required: "<font color='red'> 不能为空！</font>",
                    maxlength: "<font color='red'> 最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                billenddate: {
                    required: "<font color='red'> 不能为空！</font>",
                    maxlength: "<font color='red'> 最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                area: {
                    maxlength: "<font color='red'>面积最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                linktel: {
                    maxlength: "<font color='red'>联系方式最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                billtype: {
                    required: "<font color='red'>不能为空！</font>",
                    maxlength: "<font color='red'> 最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                creater: {
                    maxlength: "<font color='red'> creater最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                creattime: {
                    maxlength: "<font color='red'> creattime最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                updater: {
                    maxlength: "<font color='red'> updater最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                updatetime: {
                    maxlength: "<font color='red'> updatetime最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext1: {
                    required: "<font color='red'> 不能为空！</font>",
                    maxlength: "<font color='red'> ext1 最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext2: {
                    required: "<font color='red'> 不能为空！</font>",
                    maxlength: "<font color='red'>  最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext3: {
                    required: "<font color='red'> 不能为空！</font>",
                    maxlength: "<font color='red'>  最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext4: {
                    required: "<font color='red'> 不能为空！</font>",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    maxlength: "<font color='red'> 最大支持3位,输入的数据已经超过最大长度！</font>"
                },
                ext5: {
                    //required: "<font color='red'> 不能为空！</font>",
                    maxlength: "<font color='red'> 最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext6: {
                    maxlength: "<font color='red'>  最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                invoicestatus: {
                    maxlength: "<font color='red'> invoicestatus最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                invoiceno: {
                    maxlength: "<font color='red'>发票编号最大支持512位,输入的数据已经超过最大长度！</font>"
                },
                invoicedoner: {
                    maxlength: "<font color='red'>开票人最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                invoicetime: {
                    maxlength: "<font color='red'>开票时间最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                receiveinvoice: {
                    maxlength: "<font color='red'> receiveinvoice最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                latefee: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>滞纳金最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                overduemoney: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>逾期金额最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                shouldrecivetotal: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> shouldrecivetotal最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                sftype: {
                    maxlength: "<font color='red'> sftype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                basefee: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> basefee最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                paypreday: {
                    //required: " paypreday不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> paypreday最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                paypredaytype: {
                    maxlength: "<font color='red'> paypredaytype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                overduestatus: {
                    maxlength: "<font color='red'> overduestatus最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                invoicetype: {
                    maxlength: "<font color='red'> invoicetype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                rate: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>税率最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                ratemoney: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>税额最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                invoicedmoney: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> invoicedmoney最大支持22位,输入的数据已经超过最大长度！</font>"
                }
            } //end message;
        }); //end validate;
    }) //end funciton read;
</script>
